﻿package  {
	
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	
	public class RoleInfoUI extends MovieClip 
	{
		public var flag:int = 1;
		
		public var px:int = 136;
		public var py:int = 180;
		
		public function RoleInfoUI()
		{
			// constructor code
			stop();
			
			closeButton.addEventListener( MouseEvent.CLICK , onClick );
			
			clear();
			
		}
		
		private function onClick( e:MouseEvent )
		{
			this.visible = false;
		}
		
		public function clear():void
		{
			visibleUp( false );

			levelUpPointMC.visible = false;
			levelUpPointText.visible = false;
		}
		
		public function levelUp( point:int ):void
		{
			levelUpPointMC.visible = true;
			
			levelUpPointText.visible = true;
			levelUpPointText.text = point.toString();
			
			visibleUp( true );
		}
		
		public function visibleUp( b:Boolean ):void
		{
			strengthUp.visible = b;
			vitalityUp.visible = b;
			toughnessUp.visible = b;
			dexterityUp.visible = b;			
		}
		
		
		
		
	}
	
}
